package com.telnikoff.colaboration;

public abstract class Result <T>
{
	Result() {}
	
	public static <X> Success <X> newSuccess(X data)
	{
		return new Success<X>(data);
	}
	
	public static <X> Failure <X> newFailure(String reason)
	{
		return new Failure<X>(reason);
	}
	
	public static <X> Failure <X> newFailure(String reason, Throwable exception)
	{
		return new Failure<X>(reason, exception);
	}
	
	public static <X> Failure <X> newFailure(Throwable exception)
	{
		return new Failure<X>(exception);
	}
	
}
